package com.ssm.blog.controller;

import com.github.pagehelper.PageInfo;
import com.ssm.blog.pojo.Mood;
import com.ssm.blog.service.MoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/mood")
public class MoodController {
    @Autowired
    private MoodService moodService;

    @RequestMapping("/list.html")
    @ResponseBody
    public PageInfo<Mood> list(@RequestParam(defaultValue = "1") Integer pageNo) {
        return moodService.getShuoList(pageNo);
    }
    @RequestMapping("/page.html")
    public String page() {
        return "mood_list";
    }
}
